package com.legal.aid.app.config;


import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import org.springframework.web.reactive.function.client.WebClient;

@Configuration
public class MyWebClientConfig {
    @Bean(name = "deepseekWebClient")
    public WebClient webClient1(){
        return WebClient.builder()
                .baseUrl("https://api.deepseek.com")
                .defaultHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE) //设置请求头 content-type application/json
                .build(); //构建WebClient对象
    }
}